#include "message_flow.h"
#include "ext_node_func.h"

static int ext_node_func_example_0(flow_node_base_t *node, node_input_wires_t *wires_input, node_output_t *output)
{
    CENGINE_LOG(CENGINE_LOG_INFO, "enter");
    return NODE_RUN_SUCCESS;
}

static int ext_node_func_example_1(flow_node_base_t *node, node_input_wires_t *wires_input, node_output_t *output)
{
    CENGINE_LOG(CENGINE_LOG_INFO, "enter");
    return NODE_RUN_SUCCESS;
}

static int ext_node_func_example_1_parse(flow_node_base_t *node, cJSON *node_data)
{
    CENGINE_LOG(CENGINE_LOG_INFO, "enter");
    return NODE_RUN_SUCCESS;
}

static void ext_node_example_0_release()
{
    CENGINE_LOG(CENGINE_LOG_INFO, "enter");
    return;
}

// register common func here
void ext_node_func_example_init()
{
    cengine_register_ext_node("example 0", EXT_NODE_TYPE_EXAMPLE_0, ext_node_func_example_0, NULL);
    cengine_register_ext_node("example 1", EXT_NODE_TYPE_EXAMPLE_1, ext_node_func_example_1, ext_node_func_example_1_parse);
}

// release
void ext_node_func_example_release()
{
    ext_node_example_0_release();
}
